home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Space Shuttle - The First 100 Flights
/
Space Shuttle - The First 100 Flights.iso
/
trivia.dir
/
00001_Script_1
next >
Wrap
Text File
|
2000-11-09
|
2KB
|
62 lines
on StartMovie
set the stageColor to 0
global gTriviaList, proceedVal, gTotalTrivia, gCorrect
gTotalTrivia = 20
if count(gTriviaList) = gTotalTrivia then go to frame "exit" -- all done, no more qeustions
proceedVal = false
-- check to see if the question has been asked
repeat while proceedVal = false
curQuestion = random(gTotalTrivia)
if curQuestion = 0 then curQuestion = 1
compareList curQuestion
end repeat
-- continue
global gTriviaQuestion, gTriviaAnswer1, gTriviaAnswer2, gTriviaAnswer3, gTriviaAnswer4, gTriviaCorrect
question = getAt(gTriviaQuestion, curQuestion)
answer1 = getAt(gTriviaAnswer1, curQuestion)
answer2 = getAt(gTriviaAnswer2, curQuestion)
answer3 = getAt(gTriviaAnswer3, curQuestion)
answer4 = getAt(gTriviaAnswer4, curQuestion)
gCorrect = getAt(gTriviaCorrect, curQuestion)
singlebreak = "<br>"
doublebreak = "<br><br>"
dblquote = """
singlequote = "´"
set the text of member 3 to question
set the text of member 4 to answer1
set the text of member 5 to answer2
set the text of member 6 to answer3
set the text of member 7 to answer4
end
on compareList thequestion
global gTriviaList, proceedVal
match = false
repeat with n = 1 to count(gTriviaList)
if getAt(gTriviaList,n) = thequestion then match = true
end repeat
if match then
proceedVal = false
else
proceedVal = true
add(gTriviaList,thequestion)
end if
end compareList